/**
 * 
 */
package remato;

import remato.common.domain.property.PropertyTypeEnum;
import remato.domain.common.Category;
import remato.domain.common.Project;
import remato.domain.common.PropertyDef;
import remato.domain.common.PropertySet;
import remato.domain.common.PropertyValue;
import remato.domain.common.Requirement;
import remato.domain.common.RequirementSystem;
import remato.domain.common.Stakeholder;

import com.wgo.bpot.client.session.Session;

/**
 * Factory wrapper to fit other facade.
 * 
 * /@/deprecated Use: Session.createConcept(Class<targetClass>)
 * @author petterei
 * @version $Id: ConceptFactoryWrapper.java,v 1.2 2006-01-23 09:52:26 petterei Exp $
 */
//@Deprecated 
public class ConceptFactoryWrapper {

	private Session session = null;
	
	public ConceptFactoryWrapper(Session session) {
		this.session = session;
	}

	public Project createProject() {
		return session.createConcept(Project.class);
	}

	public Category createCategory() {
		return session.createConcept(Category.class);
	}

	public Requirement createRequirement() {
		return session.createConcept(Requirement.class);
	}

	public Stakeholder createStakeholder() {
		return session.createConcept(Stakeholder.class);
	}

	public PropertyDef createPropertyDef(PropertyTypeEnum type) {
		return session.createConcept(PropertyDef.class, type);
	}

	public PropertySet createPropertySet() {
		return session.createConcept(PropertySet.class);
	}

	public PropertyValue createPropertyValue(PropertyDef propertyDef) {
		return session.createConcept(PropertyValue.class, propertyDef);
	}

	public Category createCategory(String name) {
		Category concept = createCategory();
		concept.setName(name);
		return concept;
	}

	public Project createProject(String name) {
		Project concept = createProject();
		concept.setName(name);
		return concept;
	}

	public PropertyDef createPropertyDef(String name, PropertyTypeEnum type) {
		PropertyDef concept = createPropertyDef(type);
		concept.setName(name);
		return concept;
	}

	public PropertySet createPropertySet(String name) {
		PropertySet concept = createPropertySet();
		concept.setName(name);
		return concept;
	}

//	public PropertyValue createPropertyValue(PropertyDef propertyDef) {
//		PropertyValue concept = createPropertyValue(propertyDef);
//		return concept;
//	}

	public Requirement createRequirement(String name) {
		Requirement concept = createRequirement();
		concept.setName(name);
		return concept;
	}

	public Stakeholder createStakeholder(String name) {
		Stakeholder concept = createStakeholder();
		concept.setName(name);
		return concept;
	}

	public RequirementSystem getRequirementSystem() {
		return session.getRootSystem();
	}

	
	
}
